class Error(Exception):
    def __init__(self, e, password="", code=0, message=""):
        self.type = type(e).__name__
        self.password = password
        self.code = code
        self.message = message

    def __str__(self):
        return f"[{self.type}] Password: {self.password}, Code: {self.code}, Message: {self.message}"

    def __repr__(self):
        return f"[{self.type}] Password: {self.password}, Code: {self.code}, Message: {self.message}"


if __name__ == '__main__':
    raise Error("An error occurred")